﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PServiceBus.Core.Interface;
using PServiceBus.Core.Runtime.Messages;

namespace PServiceBus.Transports.Handlers {
    public sealed class RedisTransportHandler : ITransportHandler<RedisTransport> {
        #region ITransportHandler<RedisTransport> Members

        public IMessageHandler<TMessage> CreateHandler<TMessage>(RedisTransport transport) where TMessage : class {
            return MessageHandlerBase<TMessage, string>.New<RedisTransport>(this, new Redis.Provider<string>(isQueue: true), () => transport.Path);
        }

        public TimeSpan Interval { get; set; }

        public int BatchSize { get; set; }

        #endregion
    }
}
